<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>退货记录列表</title>


<link href="${base}/resources/admin/css/amazeui.css" rel="stylesheet" type="text/css" /><link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<script type="text/javascript">
    $().ready(function() {

	[@flash_message /]

    });

	function send(val) {
		if (val == "reject")
				document.form.action="reject.htm";
		if (val == "deal")
				document.form.action="deal.htm";
		form.submit();
    }
</script>
</head>
<body>
	<div class="path">
		<a href="${base}/asl-admin/common/index.htm">${message("admin.path.index")}</a> &raquo; 查看退货记录
	</div>
	<form id="inputForm" method="post" name="form">
		<input type="hidden" name="id" value="${returns_record.id}"/>
        <table class="input">
            <tr>
                <th>
                    所属订单编号:
                </th>
                <td>
                    <a class="am-badge am-badge-danger am-round" href="/asl-admin/order/view.htm?id=${returns_record.orderItem.order.id}">${returns_record.orderItem.order.sn}</a>
                </td>
            </tr>
            <tr>
                <th>
                    用户:
                </th>
                <td>
				${returns_record.member.username}(${returns_record.member.name!"暂无"})
                </td>
            </tr>
            <tr>
                <th>
                    商品全称:
                </th>
                <td>
				${returns_record.orderItem.fullName}(${returns_record.orderItem.fullName})
                </td>
            </tr>
            <tr>
                <th>
                    退货数量:
                </th>
                <td>
				${returns_record.orderItem.fullName}(${returns_record.quantity})
                </td>
            </tr>
            <tr>
                <th>
                    退货状态:
                </th>
                <td>
                    <select name="status" disabled>
					[#list ReturnsRecordStatus as rrs]
                        <option value="${rrs}"
								[#if rrs==returns_record.status]selected[/#if] >${rrs.toValue()}</option>
					[/#list]
                    </select>
				[#if returns_record.status=="deal"]退货成功[/#if]
                </td>
            </tr>
            <tr>
                <th>
                    退货原因:
                </th>
                <td>
                    <select name="reason" disabled>
                    [#list ReturnsRecordReason as rrr]
                        <option value="${rrr}"
                                [#if rrr==returns_record.reason]selected[/#if] >${rrr.toValue()}</option>
                    [/#list]
                    </select>
                </td>
            </tr>
            <tr>
                <th>
                    备注:
                </th>
                <td>
				[#if returns_record.description??]${returns_record.description}[#else]暂无[/#if]
                </td>
            </tr>
            <tr>
                <th>
                    <span class="am-badge am-badge-success am-badge-danger">注意</span>
                </th>
                <td>
                    操作完成退货申请后，需要点击 所属订单编号 <a class="am-badge am-badge-danger am-round" href="/asl-admin/order/view.htm?id=${returns_record.orderItem.order.id}">${returns_record.orderItem.order.sn}</a>
                    进入订单编辑，再操作订单退货
                </td>
            </tr>
            <tr>
                <th>
                    &nbsp;
                </th>
                <td>
                    <input type="submit" class="button" value="拒&nbsp;绝" [#if returns_record.status != "apply"]disabled[/#if] onclick='send("reject")' >
                    <input type="submit" class="button" value="退&nbsp;货" [#if returns_record.status != "apply"]disabled[/#if] onclick='send("deal")' >
                    <input type="button" class="button" value="${message("admin.common.back")}" onclick="location.href='list.htm'" />
                </td>
            </tr>
        </table>
	</form>
</body>
</html>